<template>
    <view class="_empty">
        <view class="_empty-box flexcolumn" v-if="finish">
            <image class="img" src="/static/images/nodata.png" mode="aspectFill"></image>
            <text class="txt">{{ title }}</text>
        </view>
        <view class="_empty-box flexcolumn" v-else>
            <up-loading-icon text="加载中" :vertical="true" textSize="14"></up-loading-icon>
        </view>
    </view>
</template>

<script setup>
defineProps({
    finish: {
        type: Boolean,
        default: false
    },
    title: {
        type: String,
        default: '没有更多数据了'
    }
})
</script>

<style lang="scss" scoped>
._empty {
    &-box {
        height: 480rpx;
        justify-content: center;
        align-items: center;
        .img {
            width: 200rpx;
            height: 200rpx;
            display: block;
        }
        .txt {
            font-size: 28rpx;
            color: #999;
            line-height: 40rpx;
            margin-top: 20rpx;
        }
    }
}
</style>